#ifndef _ERROR_INFO_H_
#define _ERROR_INFO_H_

#include <exception>
#include <string>

namespace Nesting
{
	
	//class Bad_file_format : public std::exception
	//{
	//public:
	//	const char* what() const throw() 
	//	{
	//		return "Bad input file format!\n";
	//	}
	//	~Bad_file_format() { }
	//};

	class Bad_input : public std::exception
	{
	public:
		Bad_input(const std::string& err_info) : info(err_info) {}
		const char* what() const throw()
		{
			return info.c_str();
		}

		~Bad_input() { }

	private:
		const std::string info;
	};

	class Bad_range : public std::exception
	{

	public:
		Bad_range(const std::string& err_info) : info(err_info) {}
		const char* what() const throw()
		{
			return info.c_str();
		}
		~Bad_range() { }

	private:
		const std::string info;
	};
}

#endif